﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using System.Xml.Serialization;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;

namespace Urbania.GUI.Elements
{
    [Serializable]
    [XmlRoot("Menu")]
    public abstract class Menu
    {
        protected Vector2 position;
        protected Color bgColor;
        protected List<GUIElement> elements;

        public Vector2 Position { get { return this.position; } set { this.position = value; } }
        public Color BackgroundColor { get { return this.bgColor; } set { this.bgColor = value; } }
        public List<GUIElement> Elements { get { return this.elements; } set { this.elements = value; } }

        public Menu()
        {
            this.position = Vector2.Zero;
            this.bgColor = Color.Black;
            this.elements = new List<GUIElement>();
        }

        public Menu(Vector2 position, Color background)
        {
            this.bgColor = background;
            this.position = position;
            this.elements = new List<GUIElement>();
        }

        public virtual void Update(GameTime gameTime, MouseState mouse) { }

        public virtual void Update(GameTime gameTime) { }

        public virtual void Draw(GameTime gameTime, SpriteBatch spriteBatch) { }
    }
}
